/*
 * @Author: toString muzi_li0323@163.com
 * @Date: 2024-05-14 16:23:29
 * @LastEditors: toString
 * @LastEditTime: 2024-12-13 17:30:12
 * @FilePath: \chain-link-api-front\vite.config.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import vue from '@vitejs/plugin-vue'
import {defineConfig} from 'vite'
// import workerPlugin  from 'vite-plugin-worker';
// import nodePolyfills from '@esbuild-plugins/node-modules-polyfill/plugin';
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        vue(),
        // workerPlugin(),
    ],
    resolve: {
        alias: {
            '@': path.resolve(__dirname, './src')  // 为./src配置别名
        }
    },

    // 混淆器 打包时移除 console.log、debugger
    build: {
        minify: 'terser',
        terserOptions: {
            compress: {
                drop_console: true,
                drop_debugger: true
            },
        }
    }
})

// vite.config.ts
